package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Notice;
import cn.wolfcode.qo.NoticeQueryObject;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NoticeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Notice record);

    Notice selectByPrimaryKey(Long id);

    List<Notice> selectAll();

    int updateByPrimaryKey(Notice record);

    List<Notice> selectForList(@Param("qo") NoticeQueryObject qo, @Param("employee") Employee employee);

    void publish(@Param("id") Long id, @Param("status") Boolean status);

    void deleteRelation(@Param("eid") Long eid, @Param("nId") Long nId);

    void insertRelation(@Param("nid") Long nid, @Param("eid") Long eid);

    void deleteRelation2(Long nid);

    List<Notice> selectReadNoticeByEmpId(Long eid);

    int selectReadNoticesCount(Long id);
}